<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="../css/yun.css" />
		<script type="text/javascript">
			window.onload = function() {

				//网盘下拉方法一
				var wp = document.getElementById("wangpan");
				var swp = document.getElementById("subject_wangpan");
				var wpxl = document.getElementById("wangpan_xiala");
				var wpfh = document.getElementById("fuhao");
				var wpfh2 = document.getElementById("fuhao2");
				wpxl.className = "close2";
				wpfh.className = "head_bg wangpan_fuhao";
				wp.onmouseover = function() {
					wpxl.className = "close";
					wp.style.backgroundColor = "#F6F6F9";
					swp.style.color = "#000000";
					wpfh2.style.visibility = "visible";
					wpfh.style.visibility = "hidden";
					wpfh2.className = "head_bg wangpan_fuhao2";
				}
				wp.onmouseout = function() {
					wpxl.className = "close2";
					wp.style.backgroundColor = "#000000";
					swp.style.color = "#F6F6F9";
					wpfh.style.visibility = "visible";
					wpfh2.style.visibility = "hidden";
					wpfh.className = "head_bg wangpan_fuhao";
				}
			}

			//网盘下拉方法二
			//					                  var wp = document.getElementById("wangpan");
			//									      function fangfa2(){
			//										  var xiala = document.getElementById("wangpan_xiala");
			//										  var classname = xiala.getAttribute("class");   
			//										  var arr = classname.split(" ");
			//									  
			//									    	for(var i = 0; i < arr.length; i++) {
			//											if(arr[i] == 'hide') arr[i] = "show";
			//											else if(arr[i] == 'show') arr[i] = "hide";
			//										}
			//										xiala.setAttribute('class', arr.join(" "));
			//									  }
			//					
			//					
			//					
			//							        wp.onmouseover=function(){
			//							        	     fangfa2();
			//							        };
			//							 
			//									wp.onmouseout = function() {
			//										fangfa2();
			//									};
			//							}

			//点击选择，切换图片
			function allbox() {
				var asb = document.getElementById("allselebox");
				var classname = asb.getAttribute("class");

				if(classname == 'allselebox1') {
					asb.setAttribute("class", "allselebox2");
				} else if(classname == 'allselebox2') {
					asb.setAttribute("class", "allselebox1");
				}

			};


             //复选框只选本行换打钩图片 并输出选中几行
			function onebox(y) {	
			//换图片
				var onetp=y.previousSibling;			
				if(y.checked==true) {
					onetp.setAttribute("class", "oneselebox2");
				}else{
					onetp.setAttribute("class", "oneselebox1");
				}
					//选中几行
					var xuannum2=document.getElementsByClassName("oneselebox1");
					var xuannum1=document.getElementsByName("onenew")
				    var num2=xuannum2.length;
				    var num1=xuannum1.length;
				        alert(num1-num2);
			}

			//新建一行的
			function addrow() {
				var newrow = document.getElementById("mytable").insertRow(mytable.rows.length);
				var cols1 = newrow.insertCell(0);
				var html = "<span class='oneselebox1' name='oneboxtp'></span><input type='checkbox' name='onenew' style='vertical-align: middle;position: relative;left: -14px;opacity:0' onclick='onebox(this)'/>"+
					"<span class='oneseletb'></span>"+
					"<input type='text' value='新建文件夹' class='newtf'/>"+
					"<span id='newgougou' onclick='gougou(this)'></span>"+
					"<span id='newchacha' onclick='chacha(this)'></span>";
				cols1.innerHTML = html;
				var cols2 = newrow.insertCell(1);
				cols2.innerHTML = "";
				var cols3 = newrow.insertCell(2);
				cols3.innerHTML = "";
			}
             
             
             //点叉叉删除本行
             function chacha(c){
             	var colcha=c.parentNode;
             	var rowcha=colcha.parentNode;
             	var tabcha=rowcha.parentNode;
             	if(tabcha) tabcha.removeChild(rowcha);
             }
             
             //点钩钩保存本行
             function gougou(g){
             	var cha=document.getElementById('newchacha');
             	var colgou=g.parentNode;
             	colgou.removeChild(cha);
             	colgou.removeChild(g);
             	var oldtf=colgou.children[3];
                oldtf.setAttribute("class","oldtf");
                oldtf.disabled="disabled";
          
             	
             	
             }

			//实现全选并根据选中换打钩图片
			function quan(x) {
				var allsele = document.getElementsByName("onenew");
				var obt = document.getElementsByName("oneboxtp");
				for(var i = 0; i < allsele.length; i++) {
					allsele[i].checked = x.checked;
					if (x.checked==true) {
						obt[i].setAttribute("class", "oneselebox2");
					} else{
						obt[i].setAttribute("class", "oneselebox1");
					}
				}
			}
			
			
//			//点击复选框判断选中几行	
//		function xuanzhong(){
//			
//		}
		
		</script>
	</head>

	<body>
		<div id="webhead">
			<a href="http://yun.baidu.com/#from=share_yun_logo" target="_blank" class="head_bg" id="head_logo"></a>

			<div id="head_subject">
				<div id="zhuye">
					<a href="http://yun.baidu.com/#from=share_yun_logo" target="_blank" class="subject_yangshi">主页</a>
				</div>
				<i class="separate"></i>
				<div id="wangpan">
					<a href="http://pan.baidu.com/disk/home#list/path=%2F" target="_blank" class="subject_yangshi" id="subject_wangpan">
						网盘
						<span id="fuhao"></span>
						<span id="fuhao2"></span>
					</a>
					<div id="wangpan_xiala" class="close hide">
						<a target="_blank" href="http://pan.baidu.com/disk/home#list/path=%2F"><span class="a1">
						</span><span id="i">网盘</span></a>

						<a target="_blank" href="https://tongxunlu.baidu.com/"><span class="a1" id="a2">	
						</span><span id="i">通讯录</span></a>

						<a target="_blank" href="https://tonghuajilu.baidu.com/disk/tonghuajilu?errno=0&errmsg=Auth%20Login%20Sucess&stoken=35079877bbb25f578758cbd68c52df088734a4d91b8e514cd2806a8c54add2dca9416803272fd6035ae5ca1eff2359613393717deeae3fc5a44f2241a133230dca004c6ac9d7&bduss=77b3fd71ef51418788802f360b3b8650e07d6dd1399fb51eb70ab3cb7213ce0763186b2b7c6f4b67fe648fc52a7bb107a58eee018e67b338a7bd658b2273e7e04ead67cca3ac87670e735f58a3772dc6ba3cdf5b2e4344b006729dd438baed187963b830340af34e4e7c5cabfc54767bb1bd4cc436885bbd9dbf64e5e072f54c166a3b88a943364ab66c4d0c9ab3f229d65d3b93898c8604a7a118296f615171bf8a57eca49948ae150eceff66a908a68f9a063d5841cd8ea42576a3ab52362c592f61ccdbd2&ssnerror=0"><span class="a1" id="a3">	
						</span><span id="i">通话记录</span></a>

						<a target="_blank" href="https://duanxin.baidu.com/#dev=R827T_OPPO_EA6393A2471F414BD76154E1B6D8A2AA"><span class="a1" id="a4">	
						</span><span id="i">短信</span></a>

						<a target="_blank" href="https://wenzhang.baidu.com/"><span class="a1" id="a5">		
						</span><span id="i">文章</span></a>

						<a target="_blank" href="http://note.baidu.com/"><span class="a1" id="a6">							
						</span><span id="i">记事本</span></a>

						<a target="_blank" href="http://zhaohui.baidu.com/#intro"><span class="a1" id="a7">							
						</span><span id="i">手机找回</span></a>

						<a target="_blank" href="http://kankan.baidu.com/"><span class="a1" id="a8">							
						</span><span id="i">云直播</span></a>

						<a target="_blank" href="https://eyun.baidu.com/enterprise/index?errno=0&errmsg=Auth%20Login%20Sucess&stoken=7f6d486ebc53957047b758dfe539b70881c4024a9c581c2e5a48272166049c21bae55d50d50e9bd3d854de0e8564a0d218830d4cd5833adb53fcd788ae16680b1719729323da&bduss=77b3fd71ef51418788802f360b3b8650e07d6dd1399fb51eb70ab3cb7213ce0763186b2b7c6f4b67fe648fc52a7bb107a58eee018e67b338a7bd658b2273e7e04ead67cca3ac87670e735f58a3772dc6ba3cdf5b2e4344b006729dd438baed187963b830340af34e4e7c5cabfc54767bb1bd4cc436885bbd9dbf64e5e072f54c166a3b88a943364ab66c4d0c9ab3f229d65d3b93898c8604a7a118296f615171bf8a57eca49948ae150eceff66a908a68f9a063d5841cd8ea42576a3ab52362c592f61ccdbd2&ssnerror=0"><span class="a1" id="a9">							
						</span><span id="i">企业版</span></a>
					</div>
				</div>
				<i class="separate"></i>
				<div id="fenxiang">
					<a href="http://pan.baidu.com/mbox/homepage#share/type=session" target="_blank" class="subject_yangshi">分享</a>
				</div>
				<div id="yingyong">
					<a href="http://yun.baidu.com/cloud/apps" target="_blank" class="subject_yangshi">应用</a>
				</div>
			</div>

			<div id="head_right">

				<ul>
					<li id="right_a1">
						<a href="http://yun.baidu.com/buy/center?tag=8&from=wzl" target="_blank" title="超级会员 悦享极速体验">超级会员 悦享极速体验</a>
					</li>
					<li id="right_a2">
						<form action="" method="post">
							<input type="text" value="搜索你的文件..." id="a2_tf" />
							<input type="submit" value="搜索" / id="a2_bt">
						</form>
					</li>
					<li id="right_a3">
						<em class="head_bg"></em>
						<span>
            				签名正在酝酿中
            			</span>
						<i class="head_bg"></i>
						<div id="a3_yincang" class="hide">
							<b id="sanjiao"></b>
							<ul id="mingzixiala"></ul>
						</div>

					</li>
					<li id="right_a4">会员中心</li>
					<li id="right_a5">客服端下载</li>
					<li id="right_a6">通知</li>
					<li id="right_a7">更多</li>

				</ul>

			</div>

		</div>
		<div id="webleft">

		</div>

		<div id="webcenter">
			<div id="center_head">
				<div id="center_head_right">
					<a class="center_head_right_a1"></a>
					<a id="center_head_right_a2" class="center_head_right_a1"></a>
				</div>
				<div id="center_head_left">
					<a id="shangchuan" title="点击选择文件">
						<span id="shangchuantb"></span>
						<span id="shangchuantx">上传</span>
						<input type="file" style="opacity: 0;display: inline-block;width:94px;height:28px;position: relative;top: -25px;"/>
					</a>

					<a id="newtext" onclick="addrow()">
						<span id="newtexttb"></span>
						<span id="newtexttx">新建文件夹</span>
					</a>
					<a id="xiazai">
						<span id="xiazaitb"></span>
						<span id="xiazaitx">离线下载</span>
					</a>
				</div>
			</div>
			<div id="alltext">
				<span id="alltext_left">全部文件</span>
				<span id="alltext_right">已全部加载，共14个</span>
			</div>

			<div id="seletext">
				<table border="0" cellspacing="" cellpadding="" id="mytable">
					<tr id="allsele">
						<th style="width: 1005px;">
							<span id="allselebox" class="allselebox1"></span>
							<input type="checkbox" name="allnew" onchange="quan(this)" onclick="allbox()" style="opacity:0;vertical-align: middle;margin-left: -20px;" />
							<span>文件名</span>
							<span id="allseletb"></span>
						</th>
						<th style="width: 270px;">大小</th>
						<th style="width: 413px;">修改日期</th>
					</tr>
				</table>
			</div>
		</div>

	</body>

</html>